package day050626;

import java.util.Scanner;

public class Test16 {
    public static void main(String[] args) {
        int[] a={9,6,7,5,6};
        Scanner s=new Scanner(System.in);
        System.out.println("请输入一个元素，返回它在a数组的位置");
        int ele=5;
        String rs="a数组中没有此元素";
        for (int i = 0; i < a.length ; i++) {
            //比较
            if(ele == a[i]){
                rs=ele+"所在的元素序号是："+i;
                break;
            }

        }
        System.out.println(rs);


    }
}
